<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head lang="zh-CN">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <script src="js/jquery-1.7.2.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
      <script src="js/jquery.validate.min.js"></script>
    <script src="js/messages_zh.js"></script>
<title>Insert title here</title>
<style type="text/css">
	.inp1{
		width: 200px;
		background-color: #fff;
							    background-image: none;
							    border: 1px solid #ccc;
							    border-radius: 4px;
							    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
							    color: #555;
							    font-size: 14px;
							    height: 34px;
							    line-height: 1.42857;
							    padding: 6px 12px;
	}
</style>
</head>
<script type="text/javascript">
	$(function(){
		//取消订单
		$("#delorder").click(function(){
			var cancel = 1;
			$.ajax({
				type:"post",
				url:'emptycar',
				data:{"cancel": cancel},
				success:function(data){
					alert("购物车空空如也，赶紧选购吧");						
				}
			})
		});

		$("#searchseller").click(function(){
			var sname = $("#searchsname").val();
			var sgenre = $("select option:selected").val();
			alert(sgenre);
			$.ajax({
				   type: "POST",
				   url: "searchseller",
				   data: {
					shopname:sname ,
					shopgenre:sgenre
				   },
				   success: function(data){
					   if(data=="1"){
				    		location.href="enterusermain"
					   }
				   }
				});
		});
	});
</script>
<body>
	<div style="height: 100%;width: 100% ;">
		<!-- 导航栏 -->
		<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
			<div class="container-fluid">
		    	<div class="navbar-header">
		      	<a class="navbar-brand" href="#">Brand</a>  <!-- logo标题 -->
		    	</div>
		
		    	<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
			      	<ul class="nav navbar-nav navbar-right" style="margin-right: 50px">
			        	<li><a href="#"><img alt="" src="img/order.png">我的订单</a></li>
			        	<li><a href="#"><img alt="" src="img/favorite.png" style="90%">我的收藏</a></li>
			        	<li><a href="shoppingcar"><img alt="" src="img/shoppingcar.png">我的购物车</a></li>
			        	<li class="dropdown">
			        		<a href="#" class="dropdown-toggle" data-toggle="dropdown">我的信息<span class="caret"></span></a>
			        		<ul class="dropdown-menu" role="menu">
					            <li><a href="#">收货地址修改</a></li>
					            <li class="divider"></li>
					            <li><a href="#">密码更改</a></li>
					    	</ul>
				        </li>
			        	<li><a href="index.jsp">退出登录</a></li>
			      	</ul>
		    	</div><!-- /.navbar-collapse -->
		  	</div><!-- /.container-fluid -->
		</nav>
		
		<!-- 搜索窗口 -->
		<div style="float: right; margin-top: 80px; margin-right:50px; text-align: center; width:30%;">
			<form id = "Search" class="form-horizontal" role="form">
				<div class="form-group">
					<div class="">
						<span >
						<select>
						<option value="" selected="selected"></option>
						  <option value="中餐">中餐</option>
						  <option value="西餐" >西餐</option>
						  <option value="快餐">快餐</option>
						</select>
				    		<input type="text" class="inp1" id="searchsname" placeholder="发现美食。。">
				    		<input button="submit" id="searchseller" class="btn btn-default" value="搜索"/>
				    	</span>
				    
			    	</div>
			  	</div>
			</form>
		</div>
		
		<!--展现页面   jsp:forward貌似挺有用的-->
		<div class="container">
			<div  class="col-md-12">
			<table class="table">
			     <c:forEach  items="${sellers}" var="sell"  varStatus="sel">
			     	<tr>
			     	<td WIDTH="200px">
				     		<img alt="" src="img/${sell.sellerimg}" style="width: 100px;height: 100px;">
				     	</td>	
			     	
			     	<td >
			     		<p style="margin-top: 40px"><a href="">${sell.shopname}</a></p>
			     	</td>
			     	<td>
			     		<p style="margin-top: 40px"><a href="">${sell.shopgenre}</a></p>
			     	</td>
			     	</tr>
			     </c:forEach>
			     </table>
			</div>
		</div>
		<div class="page" id="page" style="text-align: center;">
				 <ul class="pagination">
					   ${page}
 				 </ul>
		</div>
	</div>
</body>
</html>